#include "placepiece.h"
#include "model/ChessBoard.h"

PlacePiece::PlacePiece(const globals::cPiece& p, const model::Location& l) : loc(l), piece(p) {}

void PlacePiece::execute(model::ChessBoard& b)
{
    b.setPieceAt(loc, piece);
//	std::cout << "Place a " << (piece->isLight ? "light " : "dark ") << *piece << " at " << loc << std::endl;
}

void PlacePiece::undo(model::ChessBoard & b)
{
    b.removePieceAt(loc);
}
